package com.ibeeking.found.upms.api.feign;

import com.ibeeking.found.upms.api.feign.fallback.UpmsGFallbackFactory;
import com.ibeeking.found.upms.api.common.dto.PermissionDTO;
import com.ibeeking.nematos.utils.result.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @Author ibeeking
 */
@FeignClient(name = "base-upms-g-server", contextId = "upmsGClient", path = "/g", fallbackFactory = UpmsGFallbackFactory.class, decode404 = true)
public interface UpmsGClient {

    /**
     * 查询全部有效菜单
     *
     * @param modules
     * @return
     */
    @PostMapping(value = "/permission/feign/v1/queryAllList")
    ResponseResult<List<PermissionDTO>> queryAllList(@RequestBody List<String> modules);
    /**
     * 查询全部有效菜单
     *
     * @param ids
     * @return
     */
    @PostMapping(value = "/permission/feign/v1/queryListByIds")
    ResponseResult<List<PermissionDTO>> queryListByIds(@RequestBody List<Long> ids);

}
